/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace OpenGado.DATA.Entities
{
	/// <summary>
	/// Storage object for NHibernate mapped table 'storage'.
	/// </summary>
	[Serializable]
	public class Storage
	{
		#region Member Variables
		protected int _storeid;
		protected string _storename;
		protected IList<Product> _product;
		#endregion
		#region Constructors
			
		public Storage() {}
					
		public Storage(string storename) 
		{
			this._storename= storename;
		}

		#endregion
		#region Public Properties
		public int StoreId
		{
			get { return _storeid; }
			set {_storeid= value; }
		}
		public string StoreName
		{
			get { return _storename; }
			set {_storename= value; }
		}
		public IList<Product> Product
		{
			get { return _product; }
			set {_product= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			Storage castObj = (Storage)obj;
			return ( castObj != null ) &&
			this._storeid == castObj.StoreId;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _storeid.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
